<div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
		<?php getMenu();?>
		
		<div id="main-content"> <!-- Main Content Section with everything -->
			
			<div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>审核未通过的订单</h3>
					
					<div class="clear"></div>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1">
						<table>
							<thead>
								<tr>
								   <th><input class="check-all" type="checkbox" /></th>
								   <th>域名</th>
								   <th>公司名称</th>
								   <th>代理商昵称</th>
								   <th>订单状态</th>
								   <th>联系方式</th>
								   <th>用户需求数</th>
								   <th>预计签约时间</th>
								   <th>最后更新时间</th>
								   <th>操作</th>
								</tr>
							</thead>
							<tfoot>
								<tr>
									<td colspan="10">
										<?php echo $pages;?>  <!-- End .pagination -->
										<div class="clear"></div>
									</td>
								</tr>
							</tfoot>
						 
							<tbody>
							<?php if ($lists && $lists->num_rows() > 0):?>
							<?php foreach ($lists->result() as $list):?>
								<tr>
									<td><input type="checkbox" name="customer_id" value="<?php echo $list->id;?>" /></td>
									<td><?php echo $list->domain;?></td>
									<td><?php echo $list->customer_name;?></td>
									<td><?php echo getAgentNickNameById($list->agent_id);?></td>
									<td><?php echo getStatus($list->flag);?></td>
									<td>联系人：<?php echo $list->primary_contact_name,"<br />";?>电话：<?php echo $list->primary_contact_telphone,"<br />";?>
									<?php if ($list->primary_contact_qq){echo "QQ:",$list->primary_contact_qq,"<br />";}if ($list->primary_contact_msn){echo "MSN:",$list->primary_contact_msn,"<br />";}if ($list->primary_contact_email){echo "EMAIL:",$list->primary_contact_email,"<br />";}?></td>
									<td><?php echo $list->info_user_nums;?></td>
									<td><?php echo $list->info_sign_time;?></td>
									<td><?php echo $list->create_time;?></td>
									<td>
										<!-- Icons -->
										<a  target="_blank" href="<?php echo site_url('/agent/showCustomerDetail/'.$list->id);?>" title="Detail">详情</a>
									</td>
								</tr>
							<?php endforeach;?>
							<?php endif;?>	
							</tbody>
						</table>
						
					</div> <!-- End #tab1 -->
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->
			
			<div id="footer">
				<small> <!-- Remove this notice or replace it with whatever you want -->
						&#169; Powered by <a href="#">Leslee</a> | <a href="#">Top</a>
				</small>
			</div><!-- End #footer -->
		</div> <!-- End #main-content -->
	</div>
	<script>
		function bat_delete_customer()
		{
			var ids	= '';
			if($("[name=customer_id]:checked").size()>0)
			{
				if(!confirm('确定删除所选订单？'))
				{
					return false;
				}
				$("[name=customer_id]:checked").each(function()
				{
					ids	+=$(this).val()+'-';
				})
				window.location.href	= "/agent/bat_delete_customer/"+ids;
			}
			else
			{
				alert('请选择订单');
			}
		}
		function bat_edit_customer()
	 	{
	 	 	var ids	= '';
	 	 	if($('[name=customer_id]:checked').size()>0)
	 	 	{
	 	 		$('[name=customer_id]:checked').each(function()
	 	 	 	{
	 	 	 	 	ids	+=$(this).val()+"-";
	 	 	 	})
	 	 	}
	 	 	else
	 	 	{
	 	 	 	alert('请选择订单');
	 	 	 	return false;
	 	 	}
			if($("#bat_edit_customer").val()!='0')
			{
				window.location.href="/agent/bat_edit_cusomer/"+$("#bat_edit_customer").val()+'/'+ids;
			}
			else
			{
				alert('请选择状态');
			}
	 	}
	</script>